<div class="layui-form" lay-filter="LAY-home-page-listform" id="LAY-home-page-listform"
     style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">网页名称</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="title" value="{{ d.params.username || '' }}" lay-verify="required"
                       placeholder="请输入网页名称" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">导航</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" id="navName" value="{{ d.params.navName }}" class="layui-input" readonly/>
                <input type="hidden" id="navId" name="nav_id" value="{{ d.params.nav_id }}" class="layui-input"/>
            </script>

        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否显示</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="checkbox" name="is_show" title="开启|关闭" value="1" lay-skin="switch"
                       {{# if(d.params.is_show){ }}
                       checked
                       {{# } }}
                >
            </script>
        </div>
    </div>
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">地址重写</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" name="urlrewriter" value="{{ d.params.urlrewriter }}" lay-verify="required"-->
    <!--                       placeholder="请输入地址" autocomplete="off" class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">SEO标题</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="pagetitle" value="{{ d.params.pagetitle }}" lay-verify="required"
                       placeholder="请输入网页标题" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">SEO关键词</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="pagekeywords" value="{{ d.params.pagekeywords }}" lay-verify="required"
                       placeholder="请输入关键词" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">SEO描述</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <textarea name="pagedesc" lay-verify="required" style="width: 400px; height: 150px;" autocomplete="off"
                          class="layui-textarea">
            {{ d.params.pagedesc || '' }}
          </textarea>
            </script>
        </div>
    </div>
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">网页路由</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" name="url" value="{{ d.params.url }}" lay-verify="required"-->
    <!--                       placeholder="请输入网页路由" autocomplete="off" class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="number" name="order_id" lay-affix="number" min="0" value="{{ d.params.order_id | 0 }}"
                       lay-verify="required|number" placeholder="请输入排序" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <script type="text/html" template>
        <input type="hidden" name="page_id" value="{{ d.params.page_id || '' }}">
    </script>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="LAY-home-page-listform-submit" value="保存" class="layui-btn">
        </div>
    </div>
</div>

<script>
    layui.use('common', function (common) {
        common.formDropdownEditor(
            window.globalConfig.url_navigate_list,
            'navName',
            'navId',
            'navName',
            'id',
            'name'
        )
    });
</script>
